{template "topic_header"}
<link href="templates/default/styles/photo.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.topnew_pic_bg{ padding:10px;}
.item_wrap{ margin-right:19px;}
.main3Box_m{ padding-bottom:0;}
.item_list li,.item_list li .favorite{ width:282px;}
.item_list li{ margin-bottom:19px;}
.item_list li .ws_bd h5{ width:222px;}
.item_list li .item_photo{ width:282px;}

</style>
<script type="text/javascript">
function loadtopic_pic()
{
	$('.boutique_load').html('<span>正在加载，请稍后...</span>');
	onloading = true;
	var myAjax = $.post(
	"ajax.php?mod=topic&code=channel",
	{
		id:"{$params['id']}",
		page:topicpagenum
	},
	function (d){
		if('' != d){
			listpic(d,3);
		}
		topicpagenum++;
		$('.boutique_load').html('');
		onloading = false;
	});
}
function listpic(html,m)
{
	var s=html.split('<jishigou>');	var n=s.length;
	if(n==1){s=html.split('<JISHIGOU>');n=s.length;}//此处为兼容IE内核浏览器
	for(var i=0;i<n;i++){
		var h = $('#topic_pic_0').height();var hj = 0;
		for(var j=1;j<m;j++){
			if(h > $('#topic_pic_'+j).height()){
				h = $('#topic_pic_'+j).height();
				hj = j;
			}
		}
		$('#topic_pic_'+hj).append(s[i]);
	}
}
<!--{if $ajax_num}-->var ajax_num = {$ajax_num};<!--{else}-->var ajax_num = 0;<!--{/if}-->
var onloading = false;var topicpagenum = 2;
$(window).bind('scroll resize',function(event){
	if(!onloading && (ajax_num >= topicpagenum)){
		var ulheight = $('#topic_pic_0').height();
		for(var i=1;i<3;i++){
			if(ulheight > $('#topic_pic_'+i).height()){
				ulheight = $('#topic_pic_'+i).height();
			}
		}
		var bodyTop = document.documentElement.scrollTop + document.body.scrollTop;
		if(bodyTop+$(window).height()-200 >= ulheight){
			loadtopic_pic();
		}
	}
});
$(document).ready(function() {
var defhtml = $('#deftopic').html();
listpic(defhtml,3);
});
</script>

<div class="channelTop">
<div class="channelnav">
<div class="navLeft">{$channel_nav}</div>
</div>
<div class="channelsubnav">
<ul class="boxNav2">
  <!--{eval if('top' == $filter_view) $top = 'boxNavselect';elseif('mark' == $filter_view) $mark = 'boxNavselect';elseif('dig' == $filter_view) $dig = 'boxNavselect';		elseif('ldig' == $filter_view) $ldig = 'boxNavselect';else $post = 'boxNavselect';}-->
  <li class="{$post}"><a href="index.php?mod=channel&id={$this->Channel}&list=pic&view=post">最新发布</a></li>
   <li>|</li>
  <li class="{$dig}"><a href="index.php?mod=channel&id={$this->Channel}&list=pic&view=dig">最新{$this->Config[changeword][dig]}</a></li>
   <li>|</li>
  <li class="{$mark}"><a href="index.php?mod=channel&id={$this->Channel}&list=pic&view=mark">最新回应</a></li>
   <li>|</li>
  <li class="{$ldig}"><a href="index.php?mod=channel&id={$this->Channel}&list=pic&view=ldig">热门{$this->Config[changeword][dig]}</a></li>
   <li>|</li>
  <li class="{$top}"><a href="index.php?mod=channel&id={$this->Channel}&list=pic&view=top">推荐置顶</a></li>
  </ul> 
<div class="list_title"> 
  <a class="listmod "href="index.php?mod=channel&id={$this->Channel}&list=txt"></a>
  <a class="picmod" href="index.php?mod=channel&id={$this->Channel}&list=pic"></a>
</div>  
</div>
</div>


<div class="main">
<div style="width:985px;_height:920px;">

    <!--{loop $topic_pic_keys $key $val}-->
	<div class="item_wrap"><ul class="item_list" id="topic_pic_{$key}"></ul></div>
	<!--{/loop}-->
	<div id="deftopic" style="display:none;">
	<!--{loop $topics $val}-->
	{template "topic_new_pic_item"}
	<jishigou>
	<!--{/loop}-->
	</div>
  <div class="boutique_load"></div>
  </div>
</div>
</div>
</div>
{template "topic_footer"}